@echo off
@REM ************************************************************************
@REM * Written by Jirat Boomuang
@REM * Filename: Run-02-ChangeDateNameToAD.cmd
@REM * Revision: 1.0
@REM * Author: JiratB
@REM * Platform: Batch File on Windows Server 2008 R2
@REM * Description: Update the date name of all records with the desire format
@REM * 
@REM ************************************************************************

@REM ************************************************************************
@REM * Revision History
@REM ------------------------------------------------------------------------
@REM * Revision  Date      Signature    Description
@REM ------------------------------------------------------------------------
@REM * 1.0       20130119  JiratB       - Released to Codeplex
@REM ************************************************************************

echo "Parameter = '%1'"

IF "%1" == "11" (sqlcmd -S localhost -i ".\02-ChangeDateNameToAD-YYYYMMDD-Format01-20130106-v1.0.sql" -o ".\zz-ChangeDateNameToAD.log")
IF "%1" == "12" (sqlcmd -S localhost -i ".\02-ChangeDateNameToAD-YYYYMMDD-Format02-20130119-v1.0.sql" -o ".\zz-ChangeDateNameToAD.log")
IF "%1" == "21" (sqlcmd -S localhost -i ".\02-ChangeDateNameToAD-DDMMYYYY-Format01-20130119-v1.0.sql" -o ".\zz-ChangeDateNameToAD.log")
IF "%1" == "22" (sqlcmd -S localhost -i ".\02-ChangeDateNameToAD-DDMMYYYY-Format02-20130119-v1.0.sql" -o ".\zz-ChangeDateNameToAD.log")
IF "%1" == ""   (sqlcmd -S localhost -i ".\02-ChangeDateNameToAD-YYYYMMDD-Format01-20130106-v1.0.sql" -o ".\zz-ChangeDateNameToAD.log")

@REM ************************************************************************
@REM * End of file
@REM ************************************************************************
@echo on